{include file="public/header" /}


<div class="page">
    <div class="fixed-empty"></div>
    <form id="post_form" method="post" name="form1" action="">
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                <td style="width: 500px;" class="required"><label class="validation" for="name">发票类型名称:</label>
                     <input style="margin-left: 104px;" id="name" name="name" value="{$list.name}" class="txt" type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>

               <!--  <tr class="noborder">
                    <td class="required w150"><label class="validation">发票类型名称:</label></td>
                    <td class="vatop rowform"><input id="name" name="name" value="{$list.name}" class="txt" type="text"></td>
                    <td class="vatop tips"></td>
                </tr> -->


            <tr>
                <td style="width: 500px;" class="required"><label class="validation" for="sort">类型:</label>
                  <select style="margin-left: 154px;" name="type" id="type">
                         <option value="1"
                            <?php if(isset($list) && $list['type']==1){?>
                            selected="selected"<?php }?>
                            >纸质版</option>
                            <option value="2"
                            <?php if(isset($list) && $list['type']==2){?>
                            selected="selected"<?php }?>
                            >电子版</option>
                             <option value="3"
                            <?php if(isset($list) && $list['type']==3){?>
                            selected="selected"<?php }?>
                            >全部</option>
                    </select>
                </td>
            </tr>
<!--                 <tr>
                    <td class="required w150"><label class="validation" >类型:</label>
                    </td>
                    <td class="vatop rowform">
                        <select name="type" id="type">
                            <option value="1"
                            <?php if(isset($list) && $list['type']==1){?>
                            selected="selected"<?php }?>
                            >纸质版</option>
                            <option value="2"
                            <?php if(isset($list) && $list['type']==2){?>
                            selected="selected"<?php }?>
                            >电子版</option>
                             <option value="3"
                            <?php if(isset($list) && $list['type']==3){?>
                            selected="selected"<?php }?>
                            >全部</option>
                        </select>
                    </td>
                    <td class="vatop tips"></td>
                </tr> -->
            <tr>
                <td style="width: 500px;" class="required"><label class="validation" for="sort">开票类型:</label>
                  <select style="margin-left: 127px;" name="billing_type" id="billing_type">
                        <option value="1"
                            <?php if(isset($list) && $list['billing_type']==1){?>
                            selected="selected"<?php }?>
                            >个人</option>
                            <option value="2"
                            <?php if(isset($list) && $list['billing_type']==2){?>
                            selected="selected"<?php }?>
                            >企业</option>
                            <option value="3"
                            <?php if(isset($list) && $list['billing_type']==3){?>
                            selected="selected"<?php }?>
                            >全部</option>
                    </select>
                </td>
            </tr>
                <!-- <tr>
                    <td class="required w150"><label class="validation" for="sort">开票类型:</label>
                    </td>
                    <td class="vatop rowform">
                         <select name="billing_type" id="billing_type">

                            <option value="1"
                            <?php if(isset($list) && $list['billing_type']==1){?>
                            selected="selected"<?php }?>
                            >个人</option>
                            <option value="2"
                            <?php if(isset($list) && $list['billing_type']==2){?>
                            selected="selected"<?php }?>
                            >企业</option>
                            <option value="3"
                            <?php if(isset($list) && $list['billing_type']==3){?>
                            selected="selected"<?php }?>
                            >全部</option>
                        </select>
                    </td>
                    <td class="vatop tips"></td>
                </tr> -->

                <tr>
                <td style="width: 500px;" class="required"><label class="validation"
                                                        for="sort">{$Think.lang.ds_sort}:</label>

                   <input style="margin-left: 152px;" value="{$list.sort}" type="text" value="100" name="sort" id="sort"
                                                 class="txt"></td>

                </td>
                <td class="vatop tips"></td>
            </tr>
                <!-- <tr>
                    <td class="required w150"><label class="validation" for="sort">{$Think.lang.ds_sort}:</label>
                    </td>
                    <td class="vatop rowform"><input type="text" value="{$list.sort}" name="sort" id="sort" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr> -->
                           <tr class="noborder">
                <td class="vatop rowform" style="height: 30px;">
                    <label class="validation">是否启用：</label>
                    <div class="onoff" style="margin-top: -18px;
margin-left: 133px;">
                        <label style="margin-left: 69px;" for="site_state1"
                               class="cb-enable <?php if(isset($t_info) && $t_info['status']==1){?> selected <?php }else if(!isset($t_info)){echo 'selected';}?>">{$Think.lang.ds_open}</label>
                        <label for="site_state0"
                               class="cb-disable <?php if(isset($t_info) && $t_info['status']==0){?> selected <?php }?>">{$Think.lang.ds_close}</label>
                        <input id="site_state1" name="status" value="1"
                               type="radio" <?php if(isset($t_info) && $t_info['status']==1){?>
                        checked="checked"<?php }else if(!isset($t_info)){?> checked="checked" <?php }?>  >
                        <input id="site_state0" name="status" value="0"
                               type="radio" <?php if(isset($t_info) && $t_info['status']==0){?>
                        checked="checked"<?php }?>  >
                    </div>
                </td>
            </tr>
<!--                 <tr class="noborder">
                    <td class="vatop rowform" style="height: 30px;">
                        <label class="validation">是否启用：</label>
                        <td class="vatop rowform onoff">
                            <label for="site_state1"
                                   class="cb-enable <?php if(isset($list) && $list['status']==1){?> selected <?php }else if(!isset($list)){echo 'selected';}?>">{$Think.lang.ds_open}</label>
                            <label for="site_state0"
                                   class="cb-disable <?php if(isset($list) && $list['status']==0){?> selected <?php }?>">{$Think.lang.ds_close}</label>
                            <input id="site_state1" name="status" value="1"
                                   type="radio" <?php if(isset($list) && $list['status']==1){?>
                            checked="checked"<?php }else if(!isset($list)){?> checked="checked" <?php }?>  >
                            <input id="site_state0" name="status" value="0"
                                   type="radio" <?php if(isset($list) && $list['status']==0){?>
                            checked="checked"<?php }?>  >
                        </td>
                    </td>
                </tr> -->
            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="15" ><input style="line-height: 2px;" class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script>
    $(function () {
        $("#post_form").validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parent().parent().prev().find('td:first'));
            },
            rules: {
                name: {
                    required: true
                },
                reason_sort: {
                    required: true,
                    digits: true,
                    range: [0, 255]
                }
            },
            messages: {
                name: {
                    required: "不能为空"
                },
                sort: {
                    required: "{$Think.lang.reason_sort_digits}",
                    digits: "{$Think.lang.reason_sort_digits}",
                    range: '{$Think.lang.reason_sort_tips}'
                }
            }
        });
    });

</script>
